package com.xiaohudie.Lambda;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author xiao hu die
 * @Date 2022/2/22 13:41
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
public class People implements Comparable<People> {
 private Integer id;
 private String name;
 private List<Booke> bookeList;
 //Comparator
 @Override
 public int compareTo(People o) {
  return this.id - o.getId();
 }
}
